import { ajax } from "@/utils/request";
import '@/mock/famous/famous_doctor'
import '@/mock/reservation/reservation'

export function getDoctorInfo(data: { id: number }) {
    return ajax({
        url: '/reservationinfo',
        method: 'post',
        data
    })
}

export function getCodeNum() {
    return ajax({
        url: '/codenums',
    })
}

// 点击预约
interface IAddReservation {
    doctorname: string
    kinds: string
    hospital: string
    visitor: string
    gender: string
    age: string
    medicalInsurance?: string
    image:string
    position:string
}
export function addReservation(data: IAddReservation) {
    return ajax({
        url:'/addreservation',
        method:'post',
        data
    })
}

// 点击删除预约
export function deleteReservation(data:IAddReservation){
    return ajax({
        url:'/deletereservation',
        method:'post',
        data
    })
}